#ifndef PICCOLO_TEXTURE_H
#define PICCOLO_TEXTURE_H

#include "Graphics/PiccoloVKCommon.h"

namespace Piccolo
{
    class PiccoloVKImage;
    class PiccoloVKImageView;
    class PiccoloVKBuffer;

    struct RGBAColor
    {
        uint8_t r;
        uint8_t g;
        uint8_t b;
        uint8_t a;
    };

    class PiccoloTexture
    {
    public:
        PiccoloTexture(const std::string& filePath);
        PiccoloTexture(uint32_t width, uint32_t height, RGBAColor* pixels);
        ~PiccoloTexture();

        uint32_t GetWidth() const { return mWidth; }
        uint32_t GetHeight() const { return mHeight; }
        PiccoloVKImage* GetImage() const { return mImage.get(); }
        PiccoloVKImageView* GetImageView() const { return mImageView.get(); }

    private:
        void CreateImage(size_t size, void* data);

        uint32_t mWidth;
        uint32_t mHeight;

        VkFormat mFormat;
        std::shared_ptr<PiccoloVKImage> mImage;
        std::shared_ptr<PiccoloVKImageView> mImageView;
    };
}

#endif